Spatial Visualization of California Oil Spills in 2008
This analysis visualizes data from the Oil Spill Prevention and Response (OSPR) Incident Tracking database, collected by OSPR Field Response team members. The analysis looks at overall oil spills and a closer look at inland oil spills in 2008.
Data Source: Lampinen, Mark (2009). Oil Spill Incident Tracking [ds394]. California Department of Fish and Game, Office of Spill Prevention and Response. https://map.dfg.ca.gov/metadata/ds0394.html?5.108.39
ca_counties_sf <- read_sf(here("_posts", "2022-03-05-spatial-data", "data", "ca_counties", "CA_Counties_TIGER2016.shp")) %>%
janitor::clean_names() %>%
select(county_name = name)
# st_crs(ca_counties_sf) ### WGS84, epsg: 3857
ca_oil_sf <- read_sf(here("_posts", "2022-03-05-spatial-data", "data", "ds394", "ds394.shp")) %>%
janitor::clean_names()
# st_crs(ca_oil_sf) ### NAD83, epsg: 3310
oil_3857_sf <- st_transform(ca_oil_sf, st_crs(ca_counties_sf))
# st_crs(oil_3857_sf)
#wooh it's in wgs 84 now
tmap_mode(mode = "view")
tm_shape(ca_counties_sf) +
tm_fill() +
tm_basemap(c(StreetMap = "OpenStreetMap",
TopoMap = "OpenTopoMap")) +
tm_borders() +
tm_polygons(alpha = 0) + # remove county fill
tm_shape(ca_oil_sf) +
tm_dots(col = "indianred")